package com.qf.day03.method;
/*
定义一个方法，打印三角形，(三角形行数有调用者来确定)
 */
public class PrintTriangle {
    public static void main(String[] args) {
        printTriangle(5);

    }
    private static void printTriangle(int num){
        for (int i = 0; i <num; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print('*');
            }
            System.out.println();
        }
    }
}
